package com.principle.decorator;

public class Client {
    public static void main(String[] args) {
        //点一份 LongBlack
        Drink order = new LongBlack();
        System.out.println(order.getDes()+","+order.getPrice());
        //加入一份牛奶
         order = new Milk(order);
        System.out.println("加入牛奶"+order.cost()+","+order.getDes());
        //加入一份巧克力
        order=new Chocolate(order);
        System.out.println("加入巧克力："+order.cost()+","+order.getDes());
        //再加入一份巧克力
        order=new Chocolate(order);
        System.out.println("加入巧克力："+order.cost()+","+order.getDes());
    }
}
